﻿@{
    ViewBag.Title = "首页";
    Layout = "~/Views/Shared/IndexLayout.cshtml";
}
<div data-options="region:'north',border:false" class="header">
    <div style="position: absolute; right: 0px; bottom: 0px; color:White;">
        <a href="javascript:void(0);" class="easyui-menubutton" data-options="menu:'#layoutNorthMenu',iconCls:'icon-user_suit_black'">
            您好,@Willow.Authorization.OnlineContext.Instance.GetCurrentUser().FullName
        </a> <a href="javascript:void(0);" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-back'"
                onclick="logout()">退出系统</a>
    </div>
</div>
<div data-options="region:'west',split:true,title:'导航菜单'" style="width: 222px;">
    @Html.Action("RenderTreeNavigate")
</div>
<div id="layoutNorthMenu" style="width: 100px; display: none;">
    <div onclick="openChangePassword();">修改密码</div>
</div>

@section Script{
    <script>
        $(function () {
            $('#navigate .easyui-tree .tree-node').click(function () {
                var $title = $(this).children('.tree-title');
                var tabTitle = $title.text();
                var options = $title.children('[type=hidden]').val();
                if (options.substring(0, 1) != '{') {
                    options = '{' + options + '}';
                }
                var options = (new Function('return ' + options))();
                var url = options.url;
                var iconCls = options.iconCls;
                addTab(tabTitle, url, iconCls);
            });
        });
    </script>
}
